Warning: The magic method OCDI\OneClickDemoImport::__wakeup() must have public visibility in /htdocs/jaquet-menuiserie.ch/wp-content/plugins/one-click-demo-import/inc/OneClickDemoImport.php on line 128
@since 2.3.0
* @return array
*/
function wc_get_webhook_statuses() {
return apply_filters(
'woocommerce_webhook_statuses',
array(
'active' => __( 'Active', 'woocommerce' ),
'paused' => __( 'Paused', 'woocommerce' ),
'disabled' => __( 'Disabled', 'woocommerce' ),
)
);
}
/**
* Load webhooks.
*
* @since 3.3.0
* @throws Exception If webhook cannot be read/found and $data parameter of WC_Webhook class constructor is set.
* @param string $status Optional - status to filter results by. Must be a key in return value of @see wc_get_webhook_statuses(). @since 3.5.0.
* @param null|int $limit Limit number of webhooks loaded. @since 3.6.0.
* @return bool
*/
function wc_load_webhooks( $status = '', $limit = null ) {
$data_store = WC_Data_Store::load( 'webhook' );
$webhooks = $data_store->get_webhooks_ids( $status );
$loaded = 0;
foreach ( $webhooks as $webhook_id ) {
$webhook = new WC_Webhook( $webhook_id );
$webhook->enqueue();
$loaded ++;
if ( ! is_null( $limit ) && $loaded >= $limit ) {
break;
}
}
return 0 < $loaded;
}
/**
* Get webhook.
*
* @param int|WC_Webhook $id Webhook ID or object.
* @throws Exception If webhook cannot be read/found and $data parameter of WC_Webhook class constructor is set.
* @return WC_Webhook|null
*/
function wc_get_webhook( $id ) {
$webhook = new WC_Webhook( $id );
return 0 !== $webhook->get_id() ? $webhook : null;
}
/**
* Get webhoook REST API versions.
*
* @since 3.5.1
* @return array
*/
function wc_get_webhook_rest_api_versions() {
return array(
'wp_api_v1',
'wp_api_v2',
'wp_api_v3',
);
}
Warning: Cannot modify header information - headers already sent by (output started at /htdocs/jaquet-menuiserie.ch/wp-content/plugins/woocommerce/includes/wc-webhook-functions.php:1) in /htdocs/jaquet-menuiserie.ch/wp-content/plugins/wordfence/lib/wordfenceClass.php on line 1339
Fatal error: Uncaught Error: Call to undefined function wc_load_webhooks() in /htdocs/jaquet-menuiserie.ch/wp-content/plugins/woocommerce/includes/class-woocommerce.php:756
Stack trace:
#0 /htdocs/jaquet-menuiserie.ch/wp-content/plugins/woocommerce/includes/class-woocommerce.php(593): WooCommerce->load_webhooks()
#1 /htdocs/jaquet-menuiserie.ch/wp-includes/class-wp-hook.php(324): WooCommerce->init('')
#2 /htdocs/jaquet-menuiserie.ch/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#3 /htdocs/jaquet-menuiserie.ch/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#4 /htdocs/jaquet-menuiserie.ch/wp-settings.php(727): do_action('init')
#5 /htdocs/jaquet-menuiserie.ch/wp-config.php(90): require_once('/htdocs/jaquet-...')
#6 /htdocs/jaquet-menuiserie.ch/wp-load.php(50): require_once('/htdocs/jaquet-...')
#7 /htdocs/jaquet-menuiserie.ch/wp-blog-header.php(13): require_once('/htdocs/jaquet-...')
#8 /htdocs/jaquet-menuiserie.ch/index.php(17): require('/htdocs/jaquet-...')
#9 {main}
thrown in /htdocs/jaquet-menuiserie.ch/wp-content/plugins/woocommerce/includes/class-woocommerce.php on line 756