ShopWP Documentation

website·Indexed 35 days ago

https://docs.wpshop.io

Documentation for ShopWP, a plugin used to sync Shopify data into WordPress. It includes guides on data syncing, product display via shortcodes, and customization through PHP functions, action hooks, and JavaScript filters. Covers features like the Layout Builder, HTML templates, and subscription functionality introduced in version 8.0.

Tokens
49.7K
Snippets
327
Records
471
Agent score
69%

What's inside ShopWP

  1. Overview of ShopWP Layout Builder

    The ShopWP Layout Builder is a visual design tool based on a customized version of the Gutenberg editor. It allows developers to combine ShopWP blocks with third-party blocks to create custom product and collection displays. The builder supports five primary layout types: Shortcode, Product Detail Page (PDP), Product Listing Page (PLP), Collection Detail Page (CDP), and Collection Listing Page (CLP).
  2. Overview of ShopWP Shopify-WordPress Integration

    ShopWP is a premium WordPress plugin that allows users to display and sell Shopify products on any WordPress site. In this architecture, Shopify serves as the backend for store management (editing prices, changing product images, etc.), while WordPress acts as the frontend for presenting that data to customers.
  3. Understand ShopWP PHP function caching behavior

    PHP functions used to fetch Shopify data make a network request on the first execution. Subsequent calls will return a cached version of the payload only if the ShopWP cache is enabled. If data appears stale, the ShopWP cache must be cleared manually.
  4. Understand ShopWP checkout workflows

    ShopWP does not process checkouts internally; instead, it redirects users to the default Shopify checkout page to ensure security and performance. There are three primary ways to initiate this process:

    1. Default Checkout: Users use a built-in slide-out cart and click "Begin checkout" to be redirected to Shopify.
    2. Direct Checkout: Users click a button that bypasses the ShopWP cart and sends them directly to the Shopify checkout page with a specific product already added.
    3. Programmatic Checkout: Developers can use JavaScript action hooks to trigger checkouts based on custom logic.
  5. Sync Shopify data to WordPress using ShopWP

    ShopWP allows you to sync Shopify data including Products, Collections, Tags, Variants, Images, and Metafields into WordPress. Only products and collections assigned to the ShopWP sales channel in Shopify will be synced. ShopWP automatically clears its cache after every sync operation.
  6. Manage Shopify product display methods in ShopWP

    ShopWP provides multiple ways to display Shopify products on a WordPress site. Depending on the required level of control and the tools used, developers and users can choose from:

    • Default Pages: Pre-configured product and collection pages.
    • Shortcodes: Using the [wps_products] shortcode.
    • Gutenberg Blocks: Native WordPress block editor integration.
    • Page Builder Extensions: Dedicated extensions for Elementor and Beaver Builder.
    • Render API: For programmatic control over product rendering.
    • Layout Builder: For custom layout configurations.
  7. Understand how ShopWP automatically enables color swatches

    ShopWP automatically transforms variant buttons into color swatches if two conditions are met: the Option name in Shopify is 'Color' (case-insensitive) and the variant value corresponds to a valid HTML color name. Color swatches only appear when using the 'buttons' variant style; they do not appear for 'dropdowns'.
  8. Sync Shopify data to WordPress using ShopWP

    ShopWP allows you to sync Shopify data including Products, Collections, Tags, Variants, Images, and Metafields into WordPress. Only products and collections assigned to the ShopWP sales channel in Shopify will be synced. ShopWP automatically clears its cache after every sync operation.
  9. Locate the .myshopify.com domain

    The .myshopify.com domain is a unique identifier for your shop. You can find it in the Shopify admin by navigating to Shopify -> Settings -> Domains.
  10. Display and filter products using the [wps_products] shortcode

    The [wps_products] shortcode displays one or more Shopify products in a list or grid format. It supports various attributes for filtering (by collection, tag, vendor, etc.) and sorting. These same attributes are also compatible with other ShopWP product-related shortcodes such as [wps_products_title], [wps_products_pricing], [wps_products_gallery], [wps_products_description], and [wps_products_buy_button].
    // Display products from a collection named Featured
    [wps_products collection="featured"]
    
    // Displays the cheapest 10 products
    [wps_products sort_by="price" limit="10"]
    
    // Displays products in rows of 5, sorted by best selling
    [wps_products items_per_row="5" sort_by="best_selling"]
    
    // Link products to the Shopify detail pages and show only the featured image
    [wps_products link_to="shopify" show_featured_only="true"]
  11. Manage the ShopWP Cart and Checkout Experience

    ShopWP includes a built-in, JavaScript-powered 'slide-in' cart experience that allows customers to add products without triggering page loads. Once a customer is ready to complete their purchase, ShopWP redirects them to the default Shopify checkout page to handle payment and order placement.
  12. Exclude ShopWP collections from native WordPress search

    To prevent ShopWP collection detail pages from appearing in native WordPress search results, use the shopwp_register_collections_args filter and set the exclude_from_search argument to true. This code should be added to your WordPress theme's functions.php file.
    add_filter('shopwp_register_collections_args', function($args) {
        $args['exclude_from_search'] = true;
        return $args;
    });