WC_Data_Store::load( string $object_type )
Loads a data store.
Description #Description
Parameters #Parameters
- $object_type
-
(Required) Name of object.
Return #Return
Source #Source
File: includes/class-wc-data-store.php
public static function load( $object_type ) { return new WC_Data_Store( $object_type ); }
Changelog #Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
Related #Related
Uses #Uses
Uses | Description |
---|---|
includes/class-wc-data-store.php: WC_Data_Store::__construct() |
Tells WC_Data_Store which object (coupon, product, order, etc) store we want to work with. |
Used By #Used By
Used By | Description |
---|---|
packages/woocommerce-admin/src/Composer/Package.php: Package::is_notes_initialized() |
Checks if notes have been initialized. |
packages/woocommerce-admin/src/Notes/WooCommercePayments.php: WooCommercePayments::possibly_add_note() |
Maybe add a note on WooCommerce Payments for US based sites older than a week without the plugin installed. |
packages/woocommerce-admin/src/Notes/CouponPageMoved.php: CouponPageMoved::get_data_store() |
Get the data store object. |
packages/woocommerce-admin/src/Notes/NavigationFeedbackFollowUp.php: NavigationFeedbackFollowUp::get_note() |
Get the note. |
packages/woocommerce-admin/src/Notes/WooSubscriptionsNotes.php: WooSubscriptionsNotes::check_connection() |
Checks the connection. Adds a note (as necessary) if there is no connection. |
packages/woocommerce-admin/src/Notes/WooSubscriptionsNotes.php: WooSubscriptionsNotes::prune_inactive_subscription_notes() |
Removes notes for product_ids no longer active on this site. |
packages/woocommerce-admin/src/Notes/WooSubscriptionsNotes.php: WooSubscriptionsNotes::find_note_for_product_id() |
Finds a note for a given product ID, if the note exists at all. |
packages/woocommerce-admin/src/Notes/Notes.php: Notes::get_notes() |
Get notes from the database. |
packages/woocommerce-admin/src/Notes/Notes.php: Notes::get_notes_count() |
Get the total number of notes |
packages/woocommerce-admin/src/Notes/Notes.php: Notes::delete_notes_with_name() |
Deletes admin notes with a given name. |
packages/woocommerce-admin/src/Notes/Notes.php: Notes::delete_all_notes() |
Soft delete of all the admin notes. Returns the deleted items. |
packages/woocommerce-admin/src/Notes/Notes.php: Notes::unsnooze_notes() |
Clear note snooze status if the reminder date has been reached. |
packages/woocommerce-admin/src/Notes/Notes.php: Notes::possibly_delete_marketing_notes() |
Delete marketing notes if marketing has been opted out. |
packages/woocommerce-admin/src/Notes/Notes.php: Notes::possibly_delete_survey_notes() |
Delete actioned survey notes. |
packages/woocommerce-admin/src/Notes/Notes.php: Notes::get_note_status() |
Get the status of a given note by name. |
packages/woocommerce-admin/src/Notes/NavigationNudge.php: NavigationNudge::action_note() |
Actions the note when the option is toggled. |
packages/woocommerce-admin/src/Notes/MerchantEmailNotifications/MerchantEmailNotifications.php: MerchantEmailNotifications::run() |
Send all the notifications type |
packages/woocommerce-admin/src/Notes/InstallJPAndWCSPlugins.php: InstallJPAndWCSPlugins::action_note() |
Action the Install Jetpack and WooCommerce Shipping & Tax note, if any exists, and as long as both the Jetpack and WooCommerce Shipping & Tax plugins have been activated. |
packages/woocommerce-admin/src/Notes/Note.php: Note::__construct() |
Note constructor. Loads note data. |
packages/woocommerce-admin/src/API/Reports/Variations/Stats/Query.php: Query::get_data() |
Get variations data based on the current query vars. |
packages/woocommerce-admin/src/RemoteInboxNotifications/SpecRunner.php: SpecRunner::run_spec() |
Run the spec. |
packages/woocommerce-blocks/src/StoreApi/Utilities/CartController.php: CartController::get_variation_id_from_variation_data() |
Try to match request data to a variation ID and return the ID. |
includes/class-wc-order-item.php: WC_Order_Item::__construct() |
Constructor. |
includes/class-wc-shipping-zones.php: WC_Shipping_Zones::get_shipping_method() |
Get shipping zone using it’s ID. |
includes/class-wc-shipping-zones.php: WC_Shipping_Zones::get_zone_matching_package() |
Find a matching zone for a given package. |
includes/class-wc-shipping-zones.php: WC_Shipping_Zones::get_zones() |
Get shipping zones from the database. |
includes/class-wc-shipping-zones.php: WC_Shipping_Zones::get_zone_by() |
Get shipping zone by an ID. |
includes/class-wc-order-factory.php: WC_Order_Factory::get_order() |
Get order. |
includes/class-wc-order-factory.php: WC_Order_Factory::get_order_item() |
Get order item. |
includes/class-wc-customer-download.php: WC_Customer_Download::get_download_count() |
Get download_count. |
includes/class-wc-customer-download.php: WC_Customer_Download::__construct() |
Constructor. |
includes/admin/class-wc-admin-webhooks-table-list.php: WC_Admin_Webhooks_Table_List::prepare_items() |
Prepare table list items. |
includes/admin/notes/class-wc-notes-run-db-update.php: WC_Notes_Run_Db_Update::get_current_notice() |
Get current notice id from the database. |
includes/admin/class-wc-admin-webhooks-table-list.php: WC_Admin_Webhooks_Table_List::get_views() |
Table list views. |
includes/admin/class-wc-admin-webhooks.php: WC_Admin_Webhooks::table_list_output() |
Table list output. |
includes/admin/wc-admin-functions.php: wc_maybe_adjust_line_item_product_stock() |
Sees if line item stock has already reduced stock, and whether those values need adjusting e.g. after changing item qty. |
includes/admin/list-tables/class-wc-admin-list-table-products.php: WC_Admin_List_Table_Products::query_filters() |
Handle any custom filters. |
includes/admin/meta-boxes/class-wc-meta-box-order-downloads.php: WC_Meta_Box_Order_Downloads::output() |
Output the metabox. |
includes/admin/meta-boxes/class-wc-meta-box-order-actions.php: WC_Meta_Box_Order_Actions::save() |
Save meta box data. |
includes/class-wc-payment-tokens.php: WC_Payment_Tokens::get() |
Get a token object by ID. |
includes/class-wc-payment-tokens.php: WC_Payment_Tokens::set_users_default() |
Loops through all of a users payment tokens and sets is_default to false for all but a specific token. |
includes/class-wc-payment-tokens.php: WC_Payment_Tokens::get_token_type_by_id() |
Returns what type (credit card, echeck, etc) of token a token is by ID. |
includes/class-wc-payment-tokens.php: WC_Payment_Tokens::get_tokens() |
Gets valid tokens from the database based on user defined criteria. |
includes/class-wc-payment-tokens.php: WC_Payment_Tokens::get_customer_default_token() |
Returns a customers default token or NULL if there is no default token. |
includes/gateways/cod/class-wc-gateway-cod.php: WC_Gateway_COD::load_shipping_method_options() |
Loads all of the shipping method options for the enable_for_methods field. |
includes/class-wc-product-grouped.php: WC_Product_Grouped::sync() |
Sync a grouped product with it’s children. These sync functions sync upwards (from child to parent) when the variation is saved. |
includes/class-wc-product-query.php: WC_Product_Query::get_products() |
Get products matching the current query vars. |
includes/legacy/abstract-wc-legacy-payment-token.php: WC_Legacy_Payment_Token::update() |
Update a token. |
includes/legacy/abstract-wc-legacy-payment-token.php: WC_Legacy_Payment_Token::create() |
Create a token. |
includes/legacy/abstract-wc-legacy-payment-token.php: WC_Legacy_Payment_Token::read() |
Read a token by ID. |
includes/legacy/abstract-wc-legacy-product.php: WC_Abstract_Legacy_Product::get_matching_variation() |
Match a variation to a given set of attributes using a WP_Query. |
includes/legacy/abstract-wc-legacy-product.php: WC_Abstract_Legacy_Product::build_related_query() |
Builds the related posts query. |
includes/legacy/api/v2/class-wc-api-webhooks.php: WC_API_Webhooks::query_webhooks() |
Helper method to get webhook post objects |
includes/legacy/class-wc-legacy-shipping-zone.php: WC_Legacy_Shipping_Zone::read() |
Read a shipping zone by ID. |
includes/legacy/class-wc-legacy-shipping-zone.php: WC_Legacy_Shipping_Zone::update() |
Update a zone. |
includes/legacy/class-wc-legacy-shipping-zone.php: WC_Legacy_Shipping_Zone::create() |
Create a zone. |
includes/class-wc-cart.php: WC_Cart::add_to_cart() |
Add a product to the cart. |
includes/class-wc-ajax.php: WC_AJAX::json_search_products() |
Search for products and echo json. |
includes/class-wc-ajax.php: WC_AJAX::json_search_downloadable_products_and_variations() |
Search for downloadable product variations and return json. |
includes/class-wc-ajax.php: WC_AJAX::json_search_customers() |
Search for customers and return json. |
includes/class-wc-ajax.php: WC_AJAX::revoke_access_to_download() |
Delete download permissions via ajax function. |
includes/class-wc-ajax.php: WC_AJAX::get_variation() |
Get a matching variation based on posted attributes. |
includes/class-wc-privacy-exporters.php: WC_Privacy_Exporters::download_data_exporter() |
Finds and exports customer download logs by email address. |
includes/class-wc-order-query.php: WC_Order_Query::get_orders() |
Get orders matching the current query vars. |
includes/class-wc-product-factory.php: WC_Product_Factory::get_product_type() |
Get the product type for a product. |
includes/data-stores/class-wc-order-data-store-cpt.php: WC_Order_Data_Store_CPT::update_post_meta() |
Helper method that updates all the post meta for an order based on it’s settings in the WC_Order class. |
includes/class-wc-customer-download-log.php: WC_Customer_Download_Log::__construct() |
Constructor. |
includes/class-wc-customer.php: WC_Customer::__construct() |
Load customer data based on how WC_Customer is called. |
includes/class-wc-post-data.php: WC_Post_Data::delete_post() |
Removes variations etc belonging to a deleted post, and clears transients. |
includes/class-wc-post-data.php: WC_Post_Data::trash_post() |
Trash post. |
includes/class-wc-post-data.php: WC_Post_Data::untrash_post() |
Untrash post. |
includes/class-wc-post-data.php: WC_Post_Data::delete_order_downloadable_permissions() |
Remove downloadable permissions on permanent order deletion. |
includes/class-wc-post-data.php: WC_Post_Data::product_type_changed() |
Handle type changes. |
includes/wc-coupon-functions.php: wc_get_coupon_code_by_id() |
Get coupon code by ID. |
includes/wc-coupon-functions.php: wc_get_coupon_id_by_code() |
Get coupon ID by code. |
includes/wc-order-item-functions.php: wc_update_order_item_meta() |
WooCommerce Order Item Meta API – Update term meta. |
includes/wc-order-item-functions.php: wc_add_order_item_meta() |
WooCommerce Order Item Meta API – Add term meta. |
includes/wc-order-item-functions.php: wc_delete_order_item_meta() |
WooCommerce Order Item Meta API – Delete term meta. |
includes/wc-order-item-functions.php: wc_get_order_item_meta() |
WooCommerce Order Item Meta API – Get term meta. |
includes/wc-order-item-functions.php: wc_get_order_id_by_order_item_id() |
Get order ID by order item ID. |
includes/wc-order-item-functions.php: wc_add_order_item() |
Add a item to an order (for example a line item). |
includes/wc-order-item-functions.php: wc_update_order_item() |
Update an item for an order. |
includes/wc-order-item-functions.php: wc_delete_order_item() |
Delete an item from the order it belongs to based on item id. |
includes/wc-stock-functions.php: wc_update_product_stock() |
Update a product’s stock amount. |
includes/wc-product-functions.php: wc_get_related_products() |
Get related products based on product category and tags. |
includes/wc-product-functions.php: wc_get_product_id_by_sku() |
Get product ID by SKU. |
includes/wc-product-functions.php: wc_product_has_unique_sku() |
Check if product sku is unique. |
includes/wc-product-functions.php: wc_scheduled_sales() |
Function which handles the start and end of scheduled sales via cron. |
includes/wc-product-functions.php: wc_get_product_ids_on_sale() |
Function that returns an array containing the IDs of the products that are on sale. |
includes/wc-product-functions.php: wc_get_featured_product_ids() |
Function that returns an array containing the IDs of the featured products. |
includes/wc-user-functions.php: wc_get_customer_download_permissions() |
Get customer download permissions from the database. |
includes/wc-user-functions.php: wc_update_new_customer_past_orders() |
Get past orders (by email) and update them. |
includes/class-wc-product-variable.php: WC_Product_Variable::sync() |
Sync a variable product with it’s children. These sync functions sync upwards (from child to parent) when the variation is saved. |
includes/class-wc-product-variable.php: WC_Product_Variable::sync_stock_status() |
Sync parent stock status with the status of all children and save. |
includes/class-wc-download-handler.php: WC_Download_Handler::download_product() |
Check if we need to download a file and check validity. |
includes/abstracts/abstract-wc-order.php: WC_Abstract_Order::get_billing_and_current_user_aliases() |
Helper method to get all aliases for current user and provide billing email. |
includes/abstracts/abstract-wc-order.php: WC_Abstract_Order::__construct() |
Get the order if ID is passed, otherwise the order is new and empty. |
includes/abstracts/abstract-wc-payment-token.php: WC_Payment_Token::__construct() |
Initialize a payment token. |
includes/abstracts/abstract-wc-product.php: WC_Product::__construct() |
Get the product if ID is passed, otherwise the product is new and empty. |
includes/class-wc-order-item-product.php: WC_Order_Item_Product::get_item_downloads() |
Get any associated downloadable files. |
includes/wc-webhook-functions.php: wc_load_webhooks() |
Load webhooks. |
includes/class-wc-shipping-zone.php: WC_Shipping_Zone::__construct() |
Constructor for zones. |
includes/wc-order-functions.php: wc_order_search() |
Search orders. |
includes/wc-order-functions.php: wc_update_total_sales_counts() |
Update total sales amount for each product within a paid order. |
includes/wc-order-functions.php: wc_cancel_unpaid_orders() |
Cancel all unpaid orders after held duration to prevent stock lock for those products. |
includes/wc-order-functions.php: wc_orders_count() |
Return the orders count of a specific order status. |
includes/wc-order-functions.php: wc_get_order_id_by_order_key() |
Finds an Order ID based on an order key. |
includes/class-wc-privacy-erasers.php: WC_Privacy_Erasers::download_data_eraser() |
Finds and removes customer download logs by email address. |
includes/class-wc-coupon.php: WC_Coupon::read_object_from_database() |
If the object has an ID, read using the data store. |
src/Checkout/Helpers/ReserveStock.php: ReserveStock::reserve_stock_for_product() |
Reserve stock for a product by inserting rows into the DB. |
includes/class-wc-webhook.php: WC_Webhook::__construct() |
Load webhook data based on how WC_Webhook is called. |
packages/woocommerce-admin/src/API/Reports/Categories/Query.php: Query::get_data() |
Get categories data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Stock/Stats/Query.php: Query::get_data() |
Get product data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Orders/Stats/Query.php: Query::get_data() |
Get revenue data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Orders/Query.php: Query::get_data() |
Get order data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Customers/Stats/Query.php: Query::get_data() |
Get product data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Customers/Query.php: Query::get_data() |
Get product data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Taxes/Stats/Query.php: Query::get_data() |
Get tax stats data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Taxes/Query.php: Query::get_data() |
Get product data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Variations/Query.php: Query::get_data() |
Get product data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Products/Stats/Query.php: Query::get_data() |
Get product data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Products/Query.php: Query::get_data() |
Get product data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Coupons/Stats/Query.php: Query::get_data() |
Get product data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Coupons/Query.php: Query::get_data() |
Get product data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Downloads/Stats/Query.php: Query::get_data() |
Get revenue data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Downloads/Query.php: Query::get_data() |
Get downloads data based on the current query vars. |
packages/woocommerce-admin/src/API/Reports/Revenue/Query.php: Query::get_data() |
Get revenue data based on the current query vars. |
includes/rest-api/Controllers/Version1/class-wc-rest-webhooks-v1-controller.php: WC_REST_Webhooks_V1_Controller::get_items() |
Get all webhooks. |