{"id":19312161,"url":"https://github.com/bigcommerce/bigcommerce-for-wordpress","last_synced_at":"2025-04-04T18:06:37.238Z","repository":{"id":38554311,"uuid":"131914026","full_name":"bigcommerce/bigcommerce-for-wordpress","owner":"bigcommerce","description":"A headless commerce integration for WordPress, powered by BigCommerce","archived":false,"fork":false,"pushed_at":"2025-02-17T15:31:53.000Z","size":36029,"stargazers_count":110,"open_issues_count":29,"forks_count":48,"subscribers_count":85,"default_branch":"master","last_synced_at":"2025-03-28T14:49:48.783Z","etag":null,"topics":["bigcommerce","ecommerce","gplv2","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://www.bigcommerce.com/wordpress/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bigcommerce.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-02T22:52:50.000Z","updated_at":"2025-02-17T15:31:58.000Z","dependencies_parsed_at":"2023-01-22T02:49:49.333Z","dependency_job_id":"5387a46d-0afd-451b-8058-fcc5510b3929","html_url":"https://github.com/bigcommerce/bigcommerce-for-wordpress","commit_stats":null,"previous_names":[],"tags_count":113,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fbigcommerce-for-wordpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fbigcommerce-for-wordpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fbigcommerce-for-wordpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fbigcommerce-for-wordpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigcommerce","download_url":"https://codeload.github.com/bigcommerce/bigcommerce-for-wordpress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigcommerce","ecommerce","gplv2","wordpress","wordpress-plugin"],"created_at":"2024-11-10T00:33:20.037Z","updated_at":"2025-04-04T18:06:37.213Z","avatar_url":"https://github.com/bigcommerce.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BigCommerce for WordPress\n\n## Plugin Setup\n\nAs with any WordPress plugin, upload the plugin ZIP file to the\n`plugins` directory and activate via the WordPress admin or WP-CLI.\n\n### System Requirements\n\n* PHP: 7.4+\n* MySQL: 5.6+ (or MariaDB version 10.1+)\n* WordPress: 5.8+\n* SSL\n* The PHP intl extension will enable better currency formatting\n* Support for tmpfile() function in php.ini\n\n### Assets build\n\n* Run `nvm use`\n* Run `yarn install`\n* Run `grunt build` for production and `grunt` for development\n\n### Settings\n\nFind the BigCommerce settings screen at BigCommerce -\u003e Settings in the WordPress\nadmin menu.\n\n#### Product Sync\n\nOnce authenticated with the BigCommerce API, the plugin will import products.\nThis will run automatically using WordPress cron, using the schedule\nset on the settings page (default: daily).\n\nIf you choose to disable the cron job, you can set a server-side cron job to run the sync\nusing WP-CLI. The command to import products is:\n\n```\nwp bigcommerce import products\n```\n\nProduct titles, descriptions, and post statuses can be edited in the\nWordPress admin. Your changes will be automatically synced with your\nBigCommerce channel and preserved during future imports.\n\n#### Cart Settings\n\nWhen the cart is enabled, visitors to your store can add products to carts before checkout.\nIf it is disabled, the \"Add to Cart\" button becomes a \"Buy Now\" button, sending customers\ndirectly to checkout for that product.\n\nWhen the cart is enabled, the plugin will automatically created a page to host the cart\nshortcode, `[bigcommerce_cart]`. This shortcode will show the current visitor's cart. To\nchange this to a different page, first create a page with the cart shortcode, then come\nback to the settings page and select it from the dropdown.\n\n**Important Note:** the cart page should be excluded from any page caching system\nenabled for your site.\n\n#### Currency Settings\n\nThe store's default currency code will be imported from the BigCommerce API as part of the product\nimport process.\n\nIf the PHP intl extension is available on your server, there is nothing else to configure.\nIf it is not available, you will be presented with additional fields to control\ncurrency formatting. These will also be populated automatically from the API.\n\n**Important Note:** Currency format settings are for display only and will not affect\nprice conversion. Prices will be imported according to the default currency (the currency\nin which prices were entered).\n\nCurrency formatting can be filtered using the `bigcommerce/currency/format` filter.\n\n#### Accounts and Registration\n\nUser accounts in WordPress will be connected to customers in BigCommerce. If user\nregistration is enabled in WordPress (the \"Anyone can register\" checkbox at\nSettings -\u003e General in the WordPress admin), customers will be able to register\naccounts and manage their profiles.\n\nThe plugin requires several pages to support user account management. These pages will\nall be created automatically. Each will contain a shortcode that renders the relevant\ncontent. If any are deleted, they will be automatically re-created for you. If you have\nmultiple pages with these shortcodes, you may select which will be treated as\ncanonical using the dropdowns in this settings section.\n\nThe \"Support Email\" field will be used to give customers an address to contact you\nwith questions about orders.\n\n**Updating Account Information:** In order to update account information, including a users\npassword and have it syncronize to BigCommerce you will need to ensure you have global \nPHP tmpfile() function enabled. Please not this can be disabled on some hosting providers.\n\n### Theme Customizer\n\nThe visual presentation of your store can be customized using the WordPress theme\ncustomizer. Open the theme customizer and find the \"BigCommerce\" panel, which contains\nseveral sections.\n\n**Buttons:** Control the labels applied to buttons for interacting with products.\n\n**Colors \u0026 Themes:** Customize colors to better match your theme.\n\n**Catalog Pages:** Control the presentation of lists of products.\n\n**Product Single:** Control the presentation of individual product pages.\n\n**Product Archive:** Customize labels and filters for the product archive.\n\n### Navigation Menus\n\nThis plugin creates several pages, and they can be added to the WordPress navigation menus\nusing the standard WordPress admin (Appearance -\u003e Menus, or in the theme customizer). Some\nof these pages are treated specially when they are added to navigation menus.\n\n**Cart:** The cart menu item will show the number of items in the current user's cart.\n\n**Login:** If the user is logged in, the login page menu item becomes a link to log out.\n\n**Register:** If user registration is disabled, the menu item will be disabled (it won't\nrender on the front end of the site). If the user is logged in, the menu item will link\nto the user's account profile.\n\n**Account Profile, Order History, Addresses:** If the user is not logged in, these menu\nitems will be disabled (they won't render on the front end of the site).\n\n## Product Import\n\nProducts are imported from the BigCommerce API on a WordPress cron job, or using a WP-CLI\ncommand: `wp bigcommerce import products`\n\nThe import runs in several stages:\n\n1. If your channel does not currently have any listings, all products from\nthe store will be added to the channel.\n1. A list of all products from the channel is added to a queue for processing.\n1. Any products on the site that are no longer available in the BigCommerce channel are\nmarked for deletion.\n1. The queue is processed in chunks (five items at a time), whereby products are imported,\nupdated, or deleted to match the data in BigCommerce.\n1. Currency and other store information from the API updates settings in WordPress.\n\n## Shortcodes\n\nMost of the plugin's functionality is exposed on the front-end of the site through\nshortcodes embedded on automatically created pages. The code controlling those shortcodes\ncan be found in the classes in `src/BigCommerce/Shortcodes`.\n\n### Products Shortcode\n\n`[bigcommerce_product]`\n\nThe product shortcode can be used to include one or more products on other pages or\nposts on the WordPress site. Click the \"Add Products\" button above the editor to\nselect products or build a dynamic query to include in the page.\n\nWhile the shortcode can be built using the button, it can also be created manually. It\naccepts a number of optional attributes:\n\n`id` - A comma delimited list of BigCommerce product IDs\n\n`post_id` - A comma delimited list of WordPress product post IDs\n\n`sku` - A comma delimited list of BigCommerce product SKUs\n\n`category` - A comma delimited list of Product Category slugs\n\n`brand` - A comma delimited list of Brand slugs\n\n`featured` - Set to 1 to limit the query to featured products\n\n`sale` - Set to 1 to limit the query to sale products\n\n`recent` - Set to 1 to limit the query to products imported in the last 2 days (filter\nthe duration with the `bigcommerce/query/recent_days` filter)\n\n`search` - A search string to match against product titles, BigCommerce product IDs,\nor SKUs\n\n`paged` - Set to 0 to disable pagination\n\n`per_page` - The number of products to show per page. Defaults to the value set in the\ntheme customizer.\n\n`order` - Whether to sort products in \"ASC\" or \"DESC\" order\n\n`orderby` - Which field to use for sorting. Accepts any field that WP_Query accepts (e.g.,\ntitle, date)\n\n### Other Shortcodes\n\n`[bigcommerce_signin_form]` - The form for users to log in to the site. If user\nregistration is enabled, it will also give a link to the registration page.\n\n`[bigcommerce_registration_form]` - A form to register a new customer account.\n\n`[bigcommerce_cart]` - The items currently in the customer's cart.\n\n`[bigcommerce_account_profile]` - A form to update the customer's profile.\n\n`[bigcommerce_order_history]` - A list of the customer's past orders.\n\n`[bigcommerce_shipping_address_list]` - A list of the customer's shipping addresses, and\nforms to add, remove, or update addresses.\n\n## WP-CLI Commands\n\nThe BigCommerce for WordPress plugin includes several WP-CLI commands to help manage your store and work with products. All of the commands are subcommands of `bigcommerce`.\n\n### `bigcommerce countries update`\n\nUpdate the cache of countries and states in `countries.json`.\n\n### `bigcommerce docs build \u003cfile\u003e`\n\nBuilds plugin documentation. `\u003cfile\u003e` refers to a specific JSON file in the WordPress install to export the documentation to. Requires [WP Parser](https://github.com/WordPress/phpdoc-parser) to build documentation.\n\n### `bigcommerce docs import \u003cfile\u003e\u003e`\n\nImports plugin documentation from a JSON file (`\u003cfile\u003e`).\n\n### `bigcommerce import products`\n\nImports products from the connected BigCommerce store.\n\n### `bigcommerce resources build \u003cfile\u003e [--pretty]`\n\nBuilds plugin resources JSON from a CSV file. `\u003cfile\u003e` refers to the CSV file with resource data to import. The `--pretty` flag will format the JSON output for readability.\n\n### `bigcommerce dev reset-plugin`\n\nResets the database options for the plugin to bring you back to the beginning of the account onboarding flow. Primarily used for development purposes. **Note:** This command does not delete any products that may have been imported from your BigCommerce store.\n\n## Template Overrides\n\nAll templates that render on the front end are found in the `templates/public` directory. To\nOverride any template, create a `bigcommerce` directory in your theme and copy the template\nfile to that directory. Examples:\n\nCopy `templates/public/single-bigcommerce_product.php` to\n`bigcommerce/single-bigcommerce_product.php`\n\nCopy `templates/public/components/page-wrapper.php` to `bigcommerce/components/page-wrapper.php`\n\nMost templates are used for rendering content inside of the content area of your\ntheme's template. Only a few take over the entire page template. These may need\nmodifications to match your theme.\n\n**`single-bigcommerce_product.php`:** The template for rendering a single Product post.\n\n**`archive-bigcommerce_product.php`:** The template for rendering the Product post type\narchive.\n\nBoth of these templates call `get_header()` and `get_footer()` to render your theme's\ndefault header and footer. The page content is rendered inside the wrapper template found\nin `components/page-wrapper.php`. By modifying this wrapper template to match the HTML\nmarkup of a template in your theme, you should have consistent styling across your site.\n\nAdditional precautions should be taken when editing the contents of a template override. Within\neach of the templates there are `data-attributes` and `PHP` calls that are required in order for the\ntemplate to work properly. Wherever you see a PHP call, you should assume that it is a necessary\npart of that template and should not be removed or altered. Additionally, you will find documentation\nin all of these templates denoting where specific classes or data-attributes are required. Omitting or\nremoving these classes or attributes could potentially break the JS functionality of this plugin and\nyour site's theme.\n\n## Action and Filter Hooks\n\n### Architectural Guidelines\n\nAll actions and filters called by the plugin begin with the `bigcommerce/` prefix (e.g.,\n`bigcommerce/init`). If there is a dynamic component to the hook, it should be preceded\nby an equal sign (e.g., `bigcommerce/template=' . $template . '/path`).\n\nThe entire plugin operates through closures wrapped around calls to classes instantiated\nvia a dependency injection container. In the event that you need to modify the core\nbehavior of the plugin, there are several methods to get access to these closures.\n\n**WARNING:** *Modifying core plugin functionality can lead to security vulnerabilities,\ndata corruption, broken user workflows, and an overall unpleasant experience for you and\nyour customers. Proceed at your own risk.*\n\nThe `bigcommerce/init` action fires after the plugin has completed initializing all of\nit service providers and hooked them into WordPress. It passes two arguments: the primary\nplugin controller (an instance of the `BigCommerce\\Plugin` class) and the dependency\ninjection container itself. The former is also available at any time after initialization\nby calling the function `bigcommerce()`.\n\nAn instance of each of the service providers found in the `src/BigCommerce/Container`\ndirectory can be accessed via this plugin controller, using the keys specified in\n`\\BigCommerce\\Plugin::load_service_providers()`. E.g., to get an instance of the\n`BigCommerce\\Container\\Cart` service provider, you would use `bigcommerce()-\u003ecart`.\n\nEvery action or filter callback created by one of the service providers is given an\nidentifier so that it can be retrieved and, if appropriate, unhooked from WordPress. E.g.,\nto unhook the closure that renders the product archive template and replace it with your\nown, you could do:\n\n```\nremove_action( 'bigcommerce/template/product/archive', bigcommerce()-\u003etemplates-\u003eproduct_archive, 10 );\nadd_action( 'bigcommerce/template/product/archive', 'your_callback_function', 10, 2 );\n```\n\n### Hook reference\n\nTODO: A comprehensive list of hooks is available in the code reference.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fbigcommerce-for-wordpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigcommerce%2Fbigcommerce-for-wordpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fbigcommerce-for-wordpress/lists"}