Trying to build simple deposit code that hooks into woocommerce

Try this updated code. It should work: You can check this url for more information https://awhitepixel.com/blog/woocommerce-product-data-custom-fields-tabs/ add_action( ‘woocommerce_product_options_general_product_data’, ‘add_custom_fields_seo’); function custom_fields_save_seo( $post_id ){ $product = wc_get_product($post_id); $num_package = isset($_POST[‘_deposit_price’]) ? $_POST[‘_deposit_price’] : ”; $product->update_meta_data(‘_deposit_price’, sanitize_text_field($num_package)); $product->save(); } add_action( ‘woocommerce_process_product_meta’, ‘custom_fields_save_seo’ );

Add Stripe Connect data to wc_stripe_payment_request

wc_stripe_generate_payment_request passes 3 arguments. Take a look at the source code: /** * Filter the return value of the WC_Payment_Gateway_CC::generate_payment_request. * * @since 3.1.0 * @param array $post_data * @param WC_Order $order * @param object $source */ return apply_filters( ‘wc_stripe_generate_payment_request’, $post_data, $order, $prepared_source ); Try setting the correct amount of arguments to the filter hook, … Read more

Default image size not working

My guess is that there are spaces at the end of the option names: update_option(‘image_default_size ‘, ‘post_size’); update_option(‘image_default_align ‘, ‘right’); it should be: update_option(‘image_default_size’, ‘post_size’); update_option(‘image_default_align’, ‘right’);