diff --git a/includes/admin/settings/class-wc-gzd-settings-tab-shopmarks.php b/includes/admin/settings/class-wc-gzd-settings-tab-shopmarks.php index 22bcb521..740a324d 100644 --- a/includes/admin/settings/class-wc-gzd-settings-tab-shopmarks.php +++ b/includes/admin/settings/class-wc-gzd-settings-tab-shopmarks.php @@ -530,9 +530,8 @@ protected function get_digital_type_options() { $product_types = wc_get_product_types(); $digital_type_options = array_merge( array( - 'downloadable' => __( 'Downloadable Product', 'woocommerce-germanized' ), - 'virtual' => __( 'Virtual Product', 'woocommerce-germanized' ), - 'service' => __( 'Service', 'woocommerce-germanized' ), + 'virtual' => __( 'Virtual Product', 'woocommerce-germanized' ), + 'service' => __( 'Service', 'woocommerce-germanized' ), ), $product_types ); diff --git a/includes/class-wc-gzd-legal-checkbox-manager.php b/includes/class-wc-gzd-legal-checkbox-manager.php index 33f64670..9cef123f 100644 --- a/includes/class-wc-gzd-legal-checkbox-manager.php +++ b/includes/class-wc-gzd-legal-checkbox-manager.php @@ -173,8 +173,9 @@ public function register_core_checkboxes() { 'is_shown' => false, 'admin_name' => __( 'Digital', 'woocommerce-germanized' ), 'admin_desc' => __( 'Asks the customer to skip revocation period for digital products.', 'woocommerce-germanized' ), - 'locations' => array( 'checkout' ), + 'locations' => array( 'checkout', 'pay_for_order' ), 'types' => array( 'downloadable' ), + 'supporting_locations' => array( 'checkout', 'pay_for_order' ), ) ); @@ -193,7 +194,8 @@ public function register_core_checkboxes() { 'is_shown' => false, 'admin_name' => __( 'Service', 'woocommerce-germanized' ), 'admin_desc' => __( 'Asks the customer to skip revocation period for services.', 'woocommerce-germanized' ), - 'locations' => array( 'checkout' ), + 'locations' => array( 'checkout', 'pay_for_order' ), + 'supporting_locations' => array( 'checkout', 'pay_for_order' ), ) ); @@ -211,10 +213,10 @@ public function register_core_checkboxes() { 'error_message' => __( 'Please accept our parcel delivery agreement', 'woocommerce-germanized' ), 'is_core' => true, 'is_shown' => false, - 'supporting_locations' => array( 'checkout' ), 'admin_name' => __( 'Parcel Delivery', 'woocommerce-germanized' ), 'admin_desc' => __( 'Asks the customer to hand over data to the parcel delivery service provider.', 'woocommerce-germanized' ), - 'locations' => array( 'checkout' ), + 'locations' => array( 'checkout', 'pay_for_order' ), + 'supporting_locations' => array( 'checkout', 'pay_for_order' ), ) ); @@ -235,7 +237,7 @@ public function register_core_checkboxes() { 'is_shown' => false, 'admin_name' => __( 'Age Verification', 'woocommerce-germanized' ), 'admin_desc' => __( 'Asks the customer to confirm a minimum age.', 'woocommerce-germanized' ), - 'locations' => array( 'checkout' ), + 'locations' => array( 'checkout', 'pay_for_order' ), ) ); @@ -304,6 +306,7 @@ public function register_core_checkboxes() { 'admin_name' => __( 'SEPA', 'woocommerce-germanized' ), 'admin_desc' => __( 'Asks the customer to issue the SEPA mandate.', 'woocommerce-germanized' ), 'locations' => array( 'checkout', 'pay_for_order' ), + 'supporting_locations' => array( 'checkout', 'pay_for_order' ), ) ); } @@ -323,7 +326,8 @@ public function register_core_checkboxes() { 'is_shown' => false, 'admin_name' => __( 'Used Goods', 'woocommerce-germanized' ), 'admin_desc' => __( 'Inform customers about shortened warranty for used goods.', 'woocommerce-germanized' ), - 'locations' => array( 'checkout' ), + 'locations' => array( 'checkout', 'pay_for_order' ), + 'supporting_locations' => array( 'checkout', 'pay_for_order' ), ) ); @@ -343,7 +347,8 @@ public function register_core_checkboxes() { 'is_shown' => false, 'admin_name' => __( 'Defective Copies', 'woocommerce-germanized' ), 'admin_desc' => __( 'Inform customers about product defects.', 'woocommerce-germanized' ), - 'locations' => array( 'checkout' ), + 'locations' => array( 'checkout', 'pay_for_order' ), + 'supporting_locations' => array( 'checkout', 'pay_for_order' ), ) ); @@ -365,6 +370,7 @@ public function register_core_checkboxes() { 'admin_name' => __( 'Photovoltaic Systems', 'woocommerce-germanized' ), 'admin_desc' => __( 'Let customers confirm that they are aware of the requirements for a VAT exemption.', 'woocommerce-germanized' ), 'locations' => array( 'checkout', 'pay_for_order' ), + 'supporting_locations' => array( 'checkout', 'pay_for_order' ), ) ); } diff --git a/includes/class-wc-gzd-legal-checkbox.php b/includes/class-wc-gzd-legal-checkbox.php index d66da03f..a15f1d9f 100644 --- a/includes/class-wc-gzd-legal-checkbox.php +++ b/includes/class-wc-gzd-legal-checkbox.php @@ -450,7 +450,7 @@ public function set_locations( $locations ) { * @return array */ public function get_supporting_locations() { - return $this->settings['supporting_locations']; + return apply_filters( 'woocommerce_gzd_legal_checkbox_get_supporting_locations', $this->settings['supporting_locations'], $this ); } public function set_supporting_locations( $locations ) { diff --git a/includes/compatibility/class-wc-gzd-compatibility-woocommerce-product-addons.php b/includes/compatibility/class-wc-gzd-compatibility-woocommerce-product-addons.php index 60653254..7289232c 100644 --- a/includes/compatibility/class-wc-gzd-compatibility-woocommerce-product-addons.php +++ b/includes/compatibility/class-wc-gzd-compatibility-woocommerce-product-addons.php @@ -32,7 +32,7 @@ public function shopmarks( $post_id ) { foreach ( wc_gzd_get_single_product_shopmarks() as $shopmark ) { $callback = $shopmark->get_callback(); - if ( function_exists( $callback ) && $shopmark->is_enabled() && apply_filters( "woocommerce_gzd_product_addons_embed_price_label", true, $shopmark->get_type(), $shopmark, $product ) ) { + if ( function_exists( $callback ) && $shopmark->is_enabled() && apply_filters( 'woocommerce_gzd_product_addons_embed_price_label', true, $shopmark->get_type(), $shopmark, $product ) ) { call_user_func( $callback ); } }